export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/personal/Login.vue"),
    beforeEnter(to, from) {
      console.log(to, from);
      if (localStorage.getItem("token")) {
        return "/home";
        // return from.path;
      }
      //vue3的导航守卫没有next了 也不会拦截页面的跳转 我们可以用return 表示跳转到哪个页面
    },
  },
  {
    path: "/register",
    name: "register",
    component: () => import("./Register.vue"),
  },
];
